<!DOCTYPE html>
<html>
<head>
  <link type="text/css" rel="stylesheet" href="/static/main.css" />
<script type="text/javascript">
function post_to_url(path,method){
	method = method || "post";
   var form = document.createElement("form");
    form.setAttribute("method", method);
    form.setAttribute("action", path);
	form.submit();
}

function myFunction(path,post)
{
	var answer = confirm("Do you decide to delete?");
	if(answer)
		post_to_url(path, post);
}
</script>
  <title>Fei Fei Blog</title>
</head>

<body>
  <a href="/blog" class="main-title">
    Fei Fei Blog
  </a>

  <div class="login-area">
    {% if user %}
      {{user.name}} (<a class="login-link" href="/logout">logout</a>
	  |
	  <a class="login-link" href="/blog/newpost">newpost</a>)
    {% else %}
      <a class="login-link" href="/login">login</a>
      |
      <a class="login-link" href="/signup">signup</a>
    {% endif %}
  </div>

  <div id="content">
  {% block content %}
  {% endblock %}
  </div>
</body>

</html>

